<template>
    <div>
        <el-table
                ref="multipleTable"
                :data="loginLogList"
                tooltip-effect="dark"
                style="width: 100%"
                border
                size="mini"
                @selection-change="handleSelectionChange">
            <el-table-column
                    type="selection"
                    width="55">
            </el-table-column>
            <el-table-column
                    prop="userName"
                    label="登录名"
                   >
            </el-table-column>
            <el-table-column
                    prop="status"
                    label="登录状态"
                    >
                <template slot-scope="scope">
                    <el-tag type="danger" size="mini" v-if="scope.row.status === '登录成功'">登录成功</el-tag>
                    <el-tag type="success" size="mini" v-if="scope.row.status === '登录失败'">登录失败</el-tag>
                </template>
            </el-table-column>
            <el-table-column
                    prop="ip"
                    label="ip"
                   >
            </el-table-column>
            <el-table-column
                    prop="operation"
                    label="具体操作"
                    >
            </el-table-column>
            <el-table-column
                    prop="loginTime"
                    label="登录时间"
                    >
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    import {loginLogList} from "../../api/loginLogApi";

    export default {
        name: "SysLoginLog",
        data(){
            return{
                loginLogList:[],
            }
        },

        created(){
            loginLogList().then(res => {
                this.loginLogList = res.data;
            }).catch(() => {

            })
        },

        methods:{

        }
    }
</script>

<style scoped>

</style>